Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces new SQLite wrapper classes for executing SQL statements and retrieving query results, and updates the existing SQLite database interface to support rollback functionality. Key changes include:
- Addition of new classes: SqliteStatement and SqliteRow (both header and implementation).
- Updates to SqliteDatabase and LogSqliteDatabase to use helper functions for cleaner type conversions and to support rollback.
- Adjustments to project build files (CMakeLists.txt, vcxproj, and vcxproj.filters) to include the new source/header files.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| aregextend/db/private/SqliteStatement.cpp | New implementation of the SQLite statement wrapper. |
| aregextend/db/private/SqliteRow.cpp | New implementation of the SQLite row wrapper for fetching query results. |
| aregextend/db/private/SqliteDatabase.cpp | Updates to use inline helper functions and add rollback support. |
| aregextend/db/private/LogSqliteDatabase.cpp | Added rollback functionality. |
| aregextend/db/SqliteStatement.hpp | New header for the SQLite statement wrapper. |
| aregextend/db/SqliteRow.hpp | New header for the SQLite row wrapper. |
| aregextend/db/SqliteDatabase.hpp | Updated to declare friend relationship and add rollback function. |
| aregextend/db/LogSqliteDatabase.hpp | Added rollback declaration. |
| Various project files (CMakeLists.txt, vcxproj, vcxproj.filters) | Updated to include the newly added source and header files. |
| areg/persist/IEDatabaseEngine.hpp | Updated interface to include rollback functionality. |
Comments suppressed due to low confidence (1)
framework/aregextend/db/SqliteStatement.hpp:280
- The header declares a const overload for next(), but no corresponding implementation is provided. Please implement the const version or remove the declaration to avoid linker errors.
bool next(void) const;
Comment on lines
128
to
+130
| constexpr std::string_view sqlRoolback{ "ROLLBACK;" }; | ||
|
|
||
| return (mDbObject != nullptr ? SQLITE_OK == ::sqlite3_exec(reinterpret_cast<sqlite3*>(mDbObject), doCommit ? sqlCommit.data() : sqlRoolback.data(), nullptr, nullptr, nullptr) : false); | ||
| return (mDbObject != nullptr ? SQLITE_OK == ::sqlite3_exec(_sqlite(mDbObject), doCommit ? sqlCommit.data() : sqlRoolback.data(), nullptr, nullptr, nullptr) : false); |
There was a problem hiding this comment.
The variable name 'sqlRoolback' appears to be misspelled; consider renaming it to 'sqlRollback' for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added new SQLite wrapper classes to fetch data or run queries.